package com.hdi.block;

public class Student {

    static String name;
    static {
        System.out.println("我是静态代码块！");
    }

    public static void printHello(){
        System.out.println("hello everyone!");
        name = "张三";
    }
    {
        System.out.println("我是实例代码块！");
        name = "里斯";
        System.out.println(name);
    }
    public Student(){
        System.out.println("我是无参构造器！");
    }
    public Student(String name){
        this.name = name;
        System.out.println("我是无参构造器！");
        System.out.println(this.name);
    }
}
